/**
 * 
 */
package rest_ws;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.xml.bind.annotation.XmlElement;

import json_objects_received.JaxSport;
import json_objects_send.Full_Business;
import json_objects_send.Full_Instructor;
import json_objects_send.JSON_business;
import json_objects_send.JSON_instructor;
import logic.CluvieBusiness;
import logic.CluvieInstructor;

/**
 * @author Alejandro Casas
 *
 */
@Path("/cb")
public class RestCoachBusinessWS {

	@POST
	@Path(value="RegisterBussiness")
	@Produces(MediaType.APPLICATION_JSON)
	@Consumes(MediaType.APPLICATION_JSON)
	public JSON_business RegisterBussiness(final json_objects_received.RegisterBusiness param)
	{
		return new CluvieBusiness().registerBusiness(param.getName(),param.getType(),
		param.getMail(),
		param.getPassword(),param.getBranchlist());
	}
	@POST
	@Path(value="RegisterInstructor")
	@Produces(MediaType.APPLICATION_JSON)
	public JSON_instructor RegisterInstructor(final json_objects_received.RegisterInstructor param)
	{
		return new CluvieInstructor().registerInstructor(param.getMail(),param.getName(),
		param.getBirthday(),
		param.getType(),
		param.getPassword(),
		param.getCity(), 
		param.getCountry(),
		param.getGender(),
		param.getLat1(),
		param.getLat2(),
		param.getLat3(),
		param.getLng1(),
		param.getLng2(),
		param.getLng3(),
		param.getSports());
	}
    /*
	@POST
	@Path(value="EditBussinessProfile/{mailFrom}/{mailTo}")
	@Produces(MediaType.APPLICATION_JSON)
	public Full_Business EditBussinessProfile()
	{
		//TODO
		return null;
	}  
	/*params(carrier, description, country, picture, phone,discount, discount description, instructor type, sports list)
	*
	@POST
	@Path(value="EditInstructorProfile/{mailFrom}/{mailTo}")
	@Produces(MediaType.APPLICATION_JSON)
	public Full_Instructor EditInstructorProfile()
	{
		//TODO
		return null;
	}  
	*/
	//TODO add branch
	//TODO delete branch
	//TODO add discount
	//TODO delete discount
	
}
